package day05;

public abstract class Pet {
    String name;
    int full;
    int happy;
    public void feed(){
        if(full == 100){
            System.out.println(name+"吃不下了");
            return;
        }
        System.out.println("给"+name+"喂食");
        full += 10;
        System.out.println("饱食度:"+full);
    }
    public void play(){
        if(full < 0){
            System.out.println("饿的玩不动了，并且用泪汪汪的眼神看向你");
            return;
        }
        System.out.println("陪"+name+"玩耍");
        happy += 10;
        full -= 10;
        System.out.println("快乐度:"+happy);
        System.out.println("饱食度:"+full);
    }
    public void punish(){
        if(happy < 0){
            System.out.println(name+"不开心");
            return;
        }
        System.out.println("打"+name+"屁屁,"+name+"哭叫:"+cry());
        happy -= 10;
        System.out.println("快乐度:"+happy);
    }
    public abstract String cry();
}
